#include <ast/ast.h>

namespace ast {
  void NodeVarDecl::dot_string(std::string & str) {
    str = R"(VarDecl\n)";
    str += "type:";
    switch(this->type) {
    case VarType::i32: str += "int"; break;
    case VarType::f32: str += "float"; break;
    default: str += "undefined";
    }
  }

  void NodeVarDecl::dot_accept(AstDot & ast_dot) {
    ast_dot.visit(*this);
  }

  void NodeVarDecl::accept(ir::Visitor & visitor) {
    visitor.visit(*this);
  }
}
